//
//  SecondTableViewCell.m
//  10--HomeWork
//
//  Created by 冀永金 on 16/7/27.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "SecondTableViewCell.h"
#import "ModelOfCar.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation SecondTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createViews];
    }
    return  self;
}
- (void)createViews {
    self.imageOfFirst = [[UIImageView alloc]init];
    [self.contentView addSubview:_imageOfFirst];
    //_imageOfFirst.backgroundColor = [UIColor redColor];
    self.imageOfSecond = [[UIImageView alloc]init];
    [self.contentView addSubview:_imageOfSecond];
    // _imageOfSecond.backgroundColor = [UIColor yellowColor];
    self.imageOfThird = [[UIImageView alloc]init];
    [self.contentView addSubview:_imageOfThird];
   // _imageOfThird.backgroundColor = [UIColor blueColor];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _imageOfFirst.frame = CGRectMake(5, 10,(WIDTH - 10) / 3 ,(WIDTH - 10) / 6);
    _imageOfSecond.frame = CGRectMake(5 + (WIDTH - 10 ) / 3, 10, (WIDTH - 10) / 3, (WIDTH - 10) / 6);
    _imageOfThird.frame = CGRectMake(5 + (WIDTH - 10 ) * 2 / 3, 10, (WIDTH - 10) / 3, (WIDTH - 10) / 6);
}
- (void)setModel:(ModelOfCar *)model {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
